Hello. I typed the following
count
foreach i of local r(N){
foreach x of numlist 2000/2009{
if year_sign<=`x'{
replace year`x'=1}
}
}
Then, { required shows up.
I don't know why. Could you help me and show some reference like Stata help file?
Here is the data
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign yearsign2000 yearsign2001 yearsign2002 yearsign2003 yearsign2004 yearsign2005 yearsign2006 yearsign2007 yearsign2008 yearsign2009)
"AGO" "BDI" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BEN" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BFA" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BWA" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CAF" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CIV" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CMR" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COD" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COG" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COM" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
end
[/CODE]
count
foreach i of local r(N){
foreach x of numlist 2000/2009{
if year_sign<=`x'{
replace year`x'=1}
}
}
Then, { required shows up.
I don't know why. Could you help me and show some reference like Stata help file?
Here is the data
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign yearsign2000 yearsign2001 yearsign2002 yearsign2003 yearsign2004 yearsign2005 yearsign2006 yearsign2007 yearsign2008 yearsign2009)
"AGO" "BDI" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BEN" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BFA" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "BWA" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CAF" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CIV" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "CMR" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COD" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COG" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
"AGO" "COM" 1991 "3" 3 1991 0 0 0 0 0 0 0 0 0 0
end
[/CODE]
Comment